package com.chixing.service.impl;

import com.chixing.entity.Roomtype;
import com.chixing.mapper.RoomtypeMapper;
import com.chixing.service.IRoomtypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chixing.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author smith
 * @since 2025-09-30
 */
@Service
public class RoomtypeServiceImpl  implements IRoomtypeService {

    @Autowired
    private RoomtypeMapper roomtypeMapper;

    @Override
    public Result getByIdRoomTypeDetail(Long roomTypeId) {
        Roomtype roomtype = roomtypeMapper.selectById(roomTypeId);
        if (roomtype!=null)
            return Result.getSuccess(roomtype);
        return Result.getFail(null);
    }
}
